package cn.com.dhcc.app.pub.core.util.settlement.compute.task;

import cn.com.dhcc.app.pub.core.util.settlement.compute.store.DataProcessHandler;

import java.util.concurrent.Callable;

/**
 * 数据删除---交换平台回执过来结果是发送失败--或者过了两个小时后没响应的自动置为失败，都需要删除上次的落地数据
 * @author Administrator
 *
 */
public class DataDeleteTask implements Callable<Boolean>{
	/**
	 * 一次请求id
	 */
	private String orderId;
	
	private DataProcessHandler processHandler;
	
	
	public DataDeleteTask(String orderId,DataProcessHandler processHandler) {
		super();
		this.orderId = orderId;
		this.processHandler=processHandler;
	}



	@Override
	public Boolean call() throws Exception {
		try {
			System.out.println("["+orderId+"]数据删除开始...");
			processHandler.delete(orderId);
			System.out.println("["+orderId+"]数据删除结束...");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return true;
	}
}
